Repository navigation
Conversation
This reverts commit 534bf82. Remove the queued-deletion implementation before replaying the pause-scanning stack onto the updated main base. The stack pauses traversal to delete immediately, replacing the wait-for-scan behavior.
Interactive deletion needs filesystem workers to stop before removing paths, then resume their queued work without rescanning the whole input. Cleanup discovery and sizing must be able to share the same pause state. Add controlled walk constructors and status reporting. Pausing stops new jobs while active jobs finish, retaining the pool and its buffered output. Excluding confirmed removal paths skips queued jobs, metadata lookups, and buffered entries beneath them when traversal resumes. Cancellation and pool drop wake threads waiting at pause checkpoints. Validation: all dua-core tests and Clippy pass. Regressions cover pause and resume with one and four workers, zero-capacity output, removed subtrees, and dropping a paused walk.
Deleting during traversal races queued directory reads and can restore removed entries or count their failures as scan errors. Waiting for the whole scan to finish also prevents immediate removal of cleanup candidates. Pause ordinary traversal and cleanup discovery/sizing, drain published events, then run deletion and resume the remaining jobs. Exclude confirmed removal paths even when they have no tree node, and clear removed indices before the tree reuses their slots. Freeze mark edits during the handoff and release the pause on cancellation or failure. Ordinary scans may still hold incomplete subtree sizes, so deletion and Trash reports use unknown totals in that case. Sized cleanup candidates retain their totals; snapshot export scans still block deletion. Validation: all workspace tests, feature checks, stateless CLI journeys, and formatting pass. New journeys cover one and four threads in ordinary and cleanup scans, partial deletion, late errors, and cancellation with full output queues. Clippy passes with the pre-existing needless_bool lint allowed.
Byron
force-pushed
the
pause-scanning
branch
from
November 16, 2026 11:55
3fc31de to
e2c5737
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
If deletion should happen early, pause scans so deletion has all the resources, and so that it works for dua-clean as well.
Inspired by #433, which I thought deserves a complete implementation even if it's bigger.
Tasks
dua-core, which learns to take a break.